import React, { FC } from 'react';
import { RouteComponentProps } from 'react-router-dom'
import { UserInfo } from './UserInfo'
import './detail.css'

/**
 *
 * match
 * history
 * location
 *
 */
interface DetailProps  {
  id: string
}
type UnionType = RouteComponentProps<DetailProps>;

const Detail: FC<UnionType> = (props) => {
  console.log('props:....:', props.match.params)
  const { id } = props.match.params;
  // console.log('props:....:', props.match)
  return <div className="detail-container">Detail
      我在上海奉贤区海湾  我想去上海迪斯尼玩
        id: {id}
    <UserInfo></UserInfo>
  </div>
}

export { Detail }
